<?php /*a:3:{s:55:"/www/wwwroot/mall/public/template/user/vip/address.html";i:1628835817;s:64:"/www/wwwroot/mall/public/template/user/../index/public/mlay.html";i:1624501447;s:57:"/www/wwwroot/mall/public/template/user/public/header.html";i:1628825450;}*/ ?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<title>收货地址</title>
		<meta name="keywords" content="<?php echo config('app.web_site_keywords'); ?>">
		<meta name="description" content="<?php echo config('app.web_site_description'); ?>">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, shrink-to-fit=no, user-scalable=no">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		
		
		<!-- Icons -->
		<link rel="icon" href="/static/images/favicon.ico">
		<!-- END Icons -->
		
		<!-- Stylesheets -->
		<link rel="stylesheet" href="/static/libs/weui/css/weui.min.css">
		<link rel="stylesheet" href="/static/libs/weui/css/common.css?v=<?php echo config('app.asset_version'); ?>">
		<link rel="stylesheet" href="/static/css/font/iconfont.css?v=<?php echo config('app.asset_version'); ?>">
		<!-- END Stylesheets -->
		
<style>
	.orange .weui-btn_primary {
		background-color: #d1ab31 !important;
	}
</style>

	</head>
	<body id="<?php echo htmlentities(strtolower(app('request')->app())); ?>-<?php echo htmlentities(strtolower(app('request')->controller())); ?>-<?php echo htmlentities(strtolower(app('request')->action())); ?>">
		<!-- Page Container -->
		<div class="page" id="main">
			
<style>
	.heard-img {
		position: relative;
		background: url('/static/home/img/user_top.png') bottom center no-repeat;
		background-size: cover;
		height: 8rem;
	}

	.heard-img img {
		width: 3rem;
		border-radius: 50%;
		margin: 1.2rem 0.85rem 0.85rem 1.2rem;
		display: block;
		float: left;
		box-shadow: 0.2rem 0.2rem 0.2rem rgba(0,0,0,0.3);
	}
	
	.radius {
		margin: 0.6rem;
		border-radius: 0.3rem;
	}

	.heard-img h4 {
		font-weight: normal;
		line-height: 1.5rem;
		font-size: 1rem;
		color: #FFFFFF;
		margin: 1.2rem 0;
		display: block;
		float: left;
		width: 65%;
		/* text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.4); */
	}
	.heard-img h4 p{
		font-size: 0.7rem;
		line-height: 1rem;
		color: #F2F2F2;
	}
	.heard-img h5{
		width: 100%;
		height: 3.5rem;
		float: left;
		text-align: center;
		color: #363636;
		line-height: 3.5rem;
		font-weight: normal;
		position: absolute;
		bottom: 0;
	}
	.heard-img h4 a, .heard-img h5 a{
		font-size: 2rem;
		color: #FFFFFF;
	}

	.weui-cell {
		padding: 0.6rem 0.5rem;
	}

	.weui-cell__hd i {
		margin: 0 0.5rem;
		font-size: 1rem;
	}
</style>
<!-- Header -->
<div class="heard-img">
	<a href="<?php echo url('user/member/index'); ?>"><img src="<?php echo htmlentities((isset($user['avatar_img']) && ($user['avatar_img'] !== '')?$user['avatar_img']:'')); ?>" /></a>
	<h4><?php echo htmlentities((isset($user['nickname']) && ($user['nickname'] !== '')?$user['nickname']:"未登录")); ?><a class="block fr" href="<?php echo url('user/member/userinfo'); ?>"><i class="ico ico-set-full"></i></a>
		<p>ID：<?php echo htmlentities((isset($user['id']) && ($user['id'] !== '')?$user['id']:"0")); ?></p>
		<p><?php echo htmlentities((isset($user['group']) && ($user['group'] !== '')?$user['group']:"注册用户")); ?></p>
		<p><?php echo htmlentities((isset($user['shop']) && ($user['shop'] !== '')?$user['shop']:"未开店")); ?></p>
	</h4>
	<?php if($user['auth'] == 1): ?>
	<h5 class=""><a class="ico ico-qrcode" href="<?php echo url('user/vip/index'); ?>"></a></h5>
	<?php endif; ?>
</div>
<!-- END Header -->

			
<?php if($user['auth'] == '0'): ?>
<div class="line-div bgn"></div>
<div class="weui-msg">
	 <div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
	<div class="weui-msg__text-area">
		<h2 class="weui-msg__title">暂未获得权限</h2>
		<p class="weui-msg__desc">请实名认证后，联系管理员开通</p>
	</div>
</div>
<?php else: ?>
<div class="line-div bgn"></div>
<div class="weui-form" style="width: 100%;padding: 0;position: fixed;left: 0;position: relative;">
	<div class="weui-form__control-area">
		<div class="weui-cells__group weui-cells__group_form">
			<div class="weui-cells__title"><?php echo htmlentities((app('request')->param('tips') ?: "基本信息")); ?></div>
			<div class="weui-cells weui-cells_form">
				<div class="weui-cell weui-cell_readonly">
					<div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="realname" placeholder="填写本人真实姓名"
							value="<?php echo htmlentities((isset($user['realname']) && ($user['realname'] !== '')?$user['realname']:'')); ?>" disabled="disabled">
					</div>
				</div>
				<div class="weui-cell weui-cell_readonly mobile">
					<div class="weui-cell__hd"><label class="weui-label">电话</label></div>
					<div class="weui-cell__bd">
						<input id="mobile" class="weui-input" name="mobile" placeholder="填写本人的电话号码" type="number"
							pattern="[0-9]*" value="<?php echo htmlentities((isset($user['mobile']) && ($user['mobile'] !== '')?$user['mobile']:'')); ?>" disabled="disabled">
					</div>
				</div>
				<div class="weui-cells__title">地址详情</div>
				<div class="weui-cell" id="get_city">
					<div class="weui-cell__hd"><label class="weui-label">选择城市</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="fulladdress" placeholder="省 - 市 - 区" type="text"
							value="<?php echo htmlentities((isset($info['fulladdress']) && ($info['fulladdress'] !== '')?$info['fulladdress']:'')); ?>">
						<input type="hidden" name="province" value="<?php echo htmlentities((isset($vip['province']) && ($vip['province'] !== '')?$vip['province']:'')); ?>">
						<input type="hidden" name="city" value="<?php echo htmlentities((isset($vip['city']) && ($vip['city'] !== '')?$vip['city']:'')); ?>">
						<input type="hidden" name="country" value="<?php echo htmlentities((isset($vip['country']) && ($vip['country'] !== '')?$vip['country']:'')); ?>">
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd"><label class="weui-label">详细地址</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="address" placeholder="请填写省市区后的地址" type="text"
							value="<?php echo htmlentities((isset($vip['address']) && ($vip['address'] !== '')?$vip['address']:'')); ?>">
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd"><label class="weui-label">邮政编码</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="postalcode" placeholder="邮政编码" type="text"
							value="<?php echo htmlentities((isset($vip['postalcode']) && ($vip['postalcode'] !== '')?$vip['postalcode']:'')); ?>">
						<?php echo token_field(); ?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<?php if($vip['edit_address'] == '1'): ?>
	<div style="position: relative;bottom: 1rem;width: 100%;" class="weui-form__opr-area">
		<a class="weui-btn weui-btn_primary bgv" href="javascript:" id="to-post">提交</a>
	</div>
	<div style="position: relative;bottom: 1.5rem;width: 100%;"  class="weui-form__tips-area">
		<p class="weui-form__tips">
			收货地址信息是系统所需，请准确填写!!!
		</p>
	</div>
	<?php else: ?>
	<div style="position: relative;bottom: 1.5rem;width: 100%;" class="weui-form__tips-area">
		<p class="weui-form__tips">
			禁止修改，如需修改请联系管理员!!!
		</p>
	</div>
	<?php endif; ?>
</div>
<?php endif; ?>

		</div>
		<!-- END Page Container -->
		<!-- FOOT -->
		
		
		<!-- Footer -->
		<!-- 工具栏 -->
		<div class="footer"></div>
		<?php if(!(empty($nav['main_nav']) || (($nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator ) && $nav['main_nav']->isEmpty()))): ?>
		<nav class="bar-tab weui-flex">
			<?php if(is_array($nav['main_nav']) || $nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator): $i = 0; $__LIST__ = $nav['main_nav'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?>
			<a class="tab-item weui-flex__item<?php if(isset($active) && $active == $menu['rel']): ?> active<?php endif; ?>" href="<?php echo htmlentities($menu['url']); ?>">
				<span class="icoimg <?php echo htmlentities($menu['css']); if(isset($active) && $active == $menu['rel']): ?>-full<?php endif; ?>"></span>
				<span class="tab-label"><?php echo htmlentities($menu['title']); ?></span>
			</a>
			<?php endforeach; endif; else: echo "" ;endif; ?>
		</nav>
		<?php endif; ?>
		<!-- Footer -->
		

		
		<ul id="Fixed">
			<li id="goTop" class="ico ico-up hidden" title="去顶部"></li>
		</ul>
		
		<!-- END FOOT-->
		<div class="hidden">
			
			<?php echo config('app.web_site_statistics'); ?>
			
		</div>
		<!--js -->
		<script src="/static/libs/weui/js/jquery.min.js"></script>
		<script src="/static/libs/weui/js/weui.min.js"></script>
		<script src="/static/libs/weui/js/common.js?<?php echo config('app.asset_version'); ?>"></script>
		
		<?php if(!(empty($jssdk) || (($jssdk instanceof \think\Collection || $jssdk instanceof \think\Paginator ) && $jssdk->isEmpty()))): ?>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
		<script>
			wx.config({
				debug: false,
				appId: '<?php echo htmlentities($jssdk['appid']); ?>',
				timestamp: '<?php echo htmlentities($jssdk['timestamp']); ?>',
				nonceStr: '<?php echo htmlentities($jssdk['noncestr']); ?>',
				signature: '<?php echo htmlentities($jssdk['signature']); ?>',
				jsApiList: [
					'updateAppMessageShareData',
					'updateTimelineShareData',
					'hideMenuItems',
					'showMenuItems',
					'closeWindow',
				],
				openTagList: ['wx-open-launch-weapp']
			});
			wx.ready(function() {
				wx.updateAppMessageShareData({
					title: "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					desc: "<?php echo htmlentities((isset($share['desc']) && ($share['desc'] !== '')?$share['desc']:config('app.web_site_slogan'))); ?>", // 分享描述
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				wx.updateTimelineShareData({
					title:  "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				<?php if(!(empty($share['hide']) || (($share['hide'] instanceof \think\Collection || $share['hide'] instanceof \think\Paginator ) && $share['hide']->isEmpty()))): ?>
				wx.hideMenuItems({
					menuList: ['menuItem:copyUrl', 'menuItem:originPage', 'menuItem:readMode', 'menuItem:openWithQQBrowser',
						'menuItem:openWithSafari', 'menuItem:share:email', 'menuItem:favorite', 'menuItem:share:qq',
						'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:QZone'] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
				});
				<?php endif; ?>
				wx.showMenuItems({
					menuList: ["menuItem:profile", "menuItem:addContact", ] // 要显示的菜单项，所有menu项见附录3
				});
			});
		</script>
		<?php endif; ?>
		
		
<script>
	$(document).ready(function() {
		$("#to-post").on("click", function() {
			var data = {
				postalcode: $("input[name='postalcode']").val(),
				province: $("input[name='province']").val(),
				city: $("input[name='city']").val(),
				address: $("input[name='address']").val(),
				country: $("input[name='country']").val(),
				__token__: $("input[name='__token__']").val(),
			}
			$.post('', data, function(res) {
				if (res.code == 0) {
					weui.topTips(res.msg, {
						className: 'warning'
					});
				} else {
					weui.topTips(res.msg, {
						className: 'success'
					});
					var golink = function() {
						// window.location.href = "<?php echo url('mall/user/member/index'); ?>";
						history.go(-1);
					}
					setTimeout(golink, 500);
				}
			})
		})
		$("#get_city").on("click", function(){
			weui.picker(<?php echo json_encode($area); ?>, {
			   className: 'orange',
			   container: 'body',
			   defaultValue: ["<?php echo htmlentities((isset($vip['province']) && ($vip['province'] !== '')?$vip['province']:'0')); ?>", "<?php echo htmlentities((isset($vip['city']) && ($vip['city'] !== '')?$vip['city']:'0')); ?>", "<?php echo htmlentities((isset($vip['country']) && ($vip['country'] !== '')?$vip['country']:'0')); ?>"],
			   onChange: function (result) {
				   // console.log(result)
			   },
			   onConfirm: function (result) {
			       // console.log(result)
				   $("input[name='province']").val(result[0].value);
				   $("input[name='city']").val(result[1].value);
				   var text = result[0].label + result[1].label;
				   if (result[2]) {
					   $("input[name='country']").val(result[2].value);
					   text +=result[2].label;
				   }
				   $("input[name='fulladdress']").val(text)
			   },
			   depth: 3,
			   id: 'doubleLinePicker',
			   title: '选择城市',
			});
		})
	})
</script>

	</body>
</html>
